﻿using UnityEngine;
using System.Collections;

namespace Game
{

    public struct IntVector2
    {
        public int x, y;

        public IntVector2(int pX, int pY)
        {
            x = pX;
            y = pY;
        }

        public static IntVector2 operator +(IntVector2 left, IntVector2 right)
        {
            left.x += right.x;
            left.y += right.y;
            return left;
        }


        public static bool operator ==(IntVector2 l, IntVector2 r)
        {
            return l.x == r.x && l.y == r.y;
        }
        public static bool operator !=(IntVector2 l, IntVector2 r)
        {
            return !(l.x == r.x && l.y == r.y);
        }

        public override string ToString()
        {
            return string.Format("({0},{1})", this.x, this.y);
        }
    }

}